#pragma once

#include <Windows.h>
#include <QFile>

///-----------------------------------------------------
/// HANDLE guard
class HandleGuard
{
private:
	HANDLE handle;
public:
	explicit HandleGuard(HANDLE _handle);
	~HandleGuard(void);
	HANDLE Get();
};
///-----------------------------------------------------
/// QFile guard
class FileGuard
{
private:
	QFile& qfile;
public:
	explicit FileGuard(QFile& _file);
	~FileGuard(void);
};
///-----------------------------------------------------
/// SC_HANDLE guard
class ServiceHandleGuard
{
private:
	SC_HANDLE sc_handle;
public:
	explicit ServiceHandleGuard( SC_HANDLE _sc_handle );
	~ServiceHandleGuard(void);
	SC_HANDLE Get();
};
